"""Server URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""

from django.urls import path
from Admin import views
from Admin import views2
app_name = 'YuYunAdmin'

urlpatterns = [
    path('adminManage/',views.YuYunAdminView.as_view(),name='admin' ),   #返回管理员的信息
    path('userManage/',views.YuYunUserView.as_view(), name='user'),
    path('articleManage/',views.YuYunArticleView.as_view(), name='article'),
    path('questionManage/',views.YuYunQuestionView.as_view(), name='question'),
    path('disgroupManage/',views.YuYunDisGroupView.as_view(), name='disgroup'),
    path('login',views.YuYunLoginView.as_view(),name='login'),
    #删除一个管理员
    path('delete_admin/<int:pk>',views2.YuYunDeleteAdminView().as_view(),name="delete_admin"),
    path('delete_user/<int:pk>', views2.YuYunDeleteUserView().as_view(), name="delete_user"),
    path('delete_article/<int:pk>', views2.YuYunDeleteArticleView().as_view(), name="delete_article"),
    path('delete_disgroup/<int:pk>', views2.YuYunDeleteDisGroupView().as_view(), name="delete_disgroup"),
    path('delete_question/<int:pk>', views2.YuYunDeleteQuestionView().as_view(), name="delete_question"),

]
